<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    $router->resource('user', 'UserController', ['names' => [
        'index'   => 'admin.user.index',
        'create'  => 'admin.user.create',
        'store'   => 'admin.user.store',
        'show'    => 'admin.user.show',
        'edit'    => 'admin.user.edit',
        'update'  => 'admin.user.update',
        'destroy' => 'admin.user.destroy'
    ]]);
    $router->resource('articles', 'ArticleController', ['names' => [
        'index'   => 'admin.articles.index',
        'create'  => 'admin.articles.create',
        'store'   => 'admin.articles.store',
        'show'    => 'admin.articles.show',
        'edit'    => 'admin.articles.edit',
        'update'  => 'admin.articles.update',
        'destroy' => 'admin.articles.destroy'
    ]]);
    //$router->get('/articles/index', 'ArticleController@index');
    //$router->get('/articles/index/create', 'ArticleController@create');
});
